package xan.tm.digital.common.enums;

import lombok.Getter;


@Getter
public enum ErrorCodeEnum {

    /**
     * 错误码枚举
     */
    SUCCESS(10000, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"), // params_error

    NOT_LOGIN_ERROR(40100, "未登录"), // not_login_error

    NO_AUTH_ERROR(40101, "无权限"), // not_auth_error

    SIGN_ERROR(40102, "签名错误"),

    NOT_FOUND_ERROR(40400, "请求的数据不存在"), // not_found_error

    FILE_SIZE_LIMIT_ERROR(40500, "上传文件大小超限"), // not_found_error

    UPLOAD_FILE_ERROR(40501, "上传文件失败"), // not_found_error
    FILE_CHECK_EMPTY(40502, "文件不能为空"),
    FILE_CHECK_FORMAT(40502, "文件格式不支持"),

    FORBIDDEN_ERROR(40300, "禁止访问"), // forbidden_error

    SYSTEM_ERROR(50000, "系统内部异常"), // system_error

    OPERATION_ERROR(50001, "操作失败"), // operation_error

    REPRODUCTION_SOUND_EXITS(50101, "音色名称已存在"),
    REPRODUCTION_INVALID_MODEL_CODE(50102, "无效得modelCode"),
    REPRODUCTION_WAIT(50201, "等待结果中"),
    REPRODUCTION_FAIL(50202, "失败"),
    REQUEST_ALG_FAIL(50203, "请求算法服务失败"),
    REQUEST_ALG_RETURN_FAIL(50204, "创建任务返回失败"),
    VIDEO_FORMAT_CONVERT_FAIL(50205, "视频格式转换失败"),
    CREATE_REPRODUCTION_SOUND_FAIL(50206, "创建复刻音色失败"),
    VIDEO_FORMAT_RESOLUTION_FAIL(50207, "分辨率未识别"),
    VIDEO_FORMAT_FPS_FAIL(50208, "视频帧数未识别"),
    VIDEO_FORMAT_SCALE_FAIL(50209, "请传入一个竖屏视频"),
    VIDEO_FORMAT_ROTATE_FAIL(50210, "校验视频旋转失败"),


    NAME_EXIST(50210, "数字人名称已存在，请换个名称"),

    VIDEO_GENERATE_TASK_FAIL(50204, "视频任务创建失败"),


    ;

    /**
     * 状态码
     * -- GETTER --
     *  获取错误状态码
     *
     * @return int

     */
    private final int code;

    /**
     * 信息
     * -- GETTER --
     *  获取错误响应信息
     *
     * @return {@code String}

     */
    private final String message;

    ErrorCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
